package com.headFirstModel.factoryPattern.abstractFactory.ny;

import com.headFirstModel.factoryPattern.abstractFactory.Pizza;
import com.headFirstModel.factoryPattern.abstractFactory.PizzaIngredientFactory;

/**
 * 意大利香肠披萨
 */
public class NYPeppernoiPizza extends Pizza {
    PizzaIngredientFactory ingredientFactory;

    public NYPeppernoiPizza(PizzaIngredientFactory ingredientFactory){
        this.ingredientFactory=ingredientFactory;
    }

    @Override
    public void prepare() {
        System.out.println("纽约风味意大利香肠披萨生产中...");
        dough=ingredientFactory.createDough();
        dough.createDough();
    }

    @Override
    public void bake() {
        System.out.println("纽约风味意大利香肠披萨烘烤中...");
    }

    @Override
    public void cut() {
        System.out.println("纽约风味意大利香肠披萨切割中...");
    }

    @Override
    public void box() {
        System.out.println("纽约风味意大利香肠披萨包装中...");
    }
}
